<?php if (!is_single() and !is_home() and !is_page() and is_paged() and !is_attachment()) braille_post_links(); ?>

	<?php if (is_search()) : ?><h1><?php echo wptexturize(sprintf(__('Search Results for "%s"', 'braille'), wp_specialchars($s))); ?></h1><?php endif; ?>

	<?php if ( have_posts() ) {

		$count_users = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->usermeta WHERE meta_key = '" . $table_prefix . "user_level' AND meta_value > 1 LIMIT 2");
		$multiple_users = ($count_users > 1);

		get_currentuserinfo();
		global $user_level;

		while ( have_posts() ) { the_post();

		$author_id = $post->post_author;

		if (is_single() and !is_page() and !is_attachment()) braille_post_links(); ?>
		
		<div id="entry-<?php the_ID() ?>" class="<?php braille_post_class() ?>">
			<h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title='<?php printf(__('Permalink to "%s"', 'braille'), wp_specialchars(get_the_title(),1)); ?>'><?php the_title(); ?></a></h2>
			<?php if (!is_single() and !is_page()) { ?>
			<small class="entry-meta">
				<?php printf(__('Posted by %1$s on %2$s in %3$s', 'braille'), '<span class="entry-author author vcard"><a href="'. get_author_link(0, $author_id, $authordata->user_nicename) .'" title="'. get_the_author() .'" class="url fn">'. get_the_author() .'</a></span>', '<span class="published" title="'. get_the_time('Y-m-d\TH:i:sO') .'">'. get_the_time(__('F jS, Y', 'braille')) .'</span>', '<span class="entry-category">'. braille_categories(', ', __(' and ', 'braille')).'</span>'); ?>
			<?php if ( comments_open() ) : ?>
				 &middot; <span class="entry-commentlink"><?php comments_popup_link('0 '.__('Comments', 'braille').'', '1 '.__('Comment', 'braille').'', '% '.__('Comments', 'braille').'', 'commentslink', __('Closed', 'braille')); ?></span>
			<?php endif; ?>
			</small>
			<?php } ?>
			<div class="entry-content">
				<?php if (is_archive() or is_search()) {
					the_excerpt();
				} else {
					the_content(__('Continue reading', 'braille').' "'. the_title('', '', false) .'"');
				} ?>
			</div>
		</div>
	<?php } ?>

	<?php if (is_single()) comments_template(); ?>
	<?php /* Add a custom field with key "comments" (value is ignored) to turn on comments for a page! */ ?>
	<?php if (is_page()) { ?>
		<?php if (get_post_custom_values('comments')) comments_template(); ?>
	<?php } ?>
	<?php if (!is_single() and !is_page()) braille_post_links(); ?>

<?php } else { ?>
	<div class="hentry four04">
		<h2 class="entry-title"><?php _e('Not Found', 'braille'); ?></h2>
		<div class="entry-content">
			<p><?php _e('Oh oh! What you were looking for does not exist. It may be a temporary error, it may be permant. Perhaps you should try the search on the sidebar.', 'braille'); ?></p>
		</div>
	</div>
<?php } ?>
